#ifndef ProjectSandbox_H
#define ProjectSandbox_H

#include "SmallEngine.h"
#include "Sandbox.h"

class ProjectSandbox : public Sandbox
{
public:
    ProjectSandbox(const std::string &name = "Sandbox", CC::Scene* scene = nullptr);
	virtual ~ProjectSandbox();

	virtual void OnAttach() override;
	virtual void OnDetach() override;

    virtual void OnUpdate(CC::Timestep ts, std::string renderscene = "") override;

    CC::Entity* GetNode() { return node; }
    CC::AnimationPropertyLinear* GetAnimObj() { return animLinear; }
    int GetShowWin() { return m_showWin; }

    void ShowWidget();
    void HideWidget();
    
protected:
    virtual void OnKeyReleased(CC::KeyReleasedEvent &e);
    virtual void OnKeyWinPressed(CC::KeyWinEvent &e);

    virtual void OnWindowResize(CC::WindowResizeEvent &e);
    virtual void OnWindowFramebufferResize(CC::WindowFramebufferResizeEvent &e);

private:
	glm::vec4 m_ClearColor = {0.0f, 0.0f, 0.0f, 1.0f};
    CC::Entity* node;

private:
    void ScerrnShot();
    unsigned int GetFileWriteTime(const char* filename);

    int m_showWin;
    unsigned int m_createfileTime;
    int screen_width;
    int screen_height;

    CC::AnimationPropertyLinear* animLinear;
    float value1 = 0.0;

};

#endif